package com.wandian.audio.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wandian.audio.R;
import com.wandian.audio.bean.Song;

/**
 * 本地音乐-适配器
 */
public class AudioLocalRecycleAdapter extends BaseQuickAdapter<Song, BaseViewHolder> {

    public AudioLocalRecycleAdapter(int layoutResId) {
        super(layoutResId);
    }


    @Override
    protected void convert(BaseViewHolder helper, Song item) {
//        ImageView iv_music_bg = helper.getView(R.id.iv_music_bg);
//        if(!UIUtils.isEmpty(item.getAlbum_icon())){
//            iv_music_bg.setImageBitmap(item.getAlbum_icon());
//        }
        helper.setText(R.id.tv_music_name, item.getTitle()+"")
                .setText(R.id.tv_music_author, item.getArtist()+"")
                .setText(R.id.tv_music_time, item.getDuration()/1000+"");

    }

}
